// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.

// This code was generated by google-apis-code-generator 1.5.1

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   Calendar API (calendar/v3)
// Description:
//   Manipulates events and other calendar data.
// Classes:
//   FreeBusyResponse
// Documentation:
//   https://developers.google.com/google-apps/calendar/firstapp

#include "google/calendar_api/free_busy_response.h"
#include <string>
#include "googleapis/client/data/jsoncpp_data.h"
#include "googleapis/client/util/date_time.h"
#include "googleapis/strings/stringpiece.h"

#include "google/calendar_api/free_busy_calendar.h"
#include "google/calendar_api/free_busy_group.h"


#include <string>
#include "googleapis/strings/strcat.h"

namespace google_calendar_api {
using namespace googleapis;


// Object factory method (static).
FreeBusyResponse* FreeBusyResponse::New() {
  return new client::JsonCppCapsule<FreeBusyResponse>;
}

// Standard immutable constructor.
FreeBusyResponse::FreeBusyResponse(const Json::Value& storage)
  : client::JsonCppData(storage) {
}

// Standard mutable constructor.
FreeBusyResponse::FreeBusyResponse(Json::Value* storage)
  : client::JsonCppData(storage) {
}

// Standard destructor.
FreeBusyResponse::~FreeBusyResponse() {
}

// Properties.

const client::JsonCppAssociativeArray<FreeBusyCalendar > FreeBusyResponse::get_calendars() const {
   const Json::Value& storage = Storage("calendars");
   return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<FreeBusyCalendar > >(storage);
}

client::JsonCppAssociativeArray<FreeBusyCalendar > FreeBusyResponse::mutable_calendars() {
  Json::Value* storage = MutableStorage("calendars");
  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<FreeBusyCalendar > >(storage);
}

const client::JsonCppAssociativeArray<FreeBusyGroup > FreeBusyResponse::get_groups() const {
   const Json::Value& storage = Storage("groups");
   return client::JsonValueToCppValueHelper<client::JsonCppAssociativeArray<FreeBusyGroup > >(storage);
}

client::JsonCppAssociativeArray<FreeBusyGroup > FreeBusyResponse::mutable_groups() {
  Json::Value* storage = MutableStorage("groups");
  return client::JsonValueToMutableCppValueHelper<client::JsonCppAssociativeArray<FreeBusyGroup > >(storage);
}
}  // namespace google_calendar_api
